import { useState } from 'react';

import { MsgContext } from './App';


export default function Son(props) {
  console.log(props)
  const { cb } = props;
  const [mm, setMm] = useState('hhahha')
  function handleClickTxt() {
    cb(mm)
  }
  // props.age = 12
  return (
    <div 
      onClick={handleClickTxt}
    >
      
      { props.name }
      {props.children}
    </div>
  )
}